import { getZc } from "../../request/index";
import MyNavbar from "../../Share/MyNavbar";
import { Form, Input, Button } from "antd-mobile";
function Zc() {
  const onFinish = (values: any) => {
    // console.log(234);
    getZc(values).then((res) => {
      console.log(res);
    });
  };
  return (
    <div>
      <MyNavbar></MyNavbar>
      <h2 style={{ margin: "10px" }}>注册账号</h2>
      <Form
        onFinish={onFinish}
        layout="horizontal"
        footer={
          <Button block type="submit" color="primary" size="large">
            提交
          </Button>
        }
      >
        <Form.Item
          name="username"
          label="姓名"
          rules={[{ required: true, message: "姓名不能为空" }]}
        >
          <Input placeholder="请输入姓名" />
        </Form.Item>

        <Form.Item
          name="nickname"
          label="邮箱"
          rules={[
            { required: true, message: "邮箱不能为空" },
            { pattern: /^1[3-9]\d{4}$/, message: "请输入正确邮箱" },
          ]}
        >
          <Input  placeholder="请输入邮箱" />
        </Form.Item>

        <Form.Item
          name="password"
          label="密码"
          rules={[{ required: true, message: "密码不能为空" }]}
        >
          <Input  placeholder="请输入密码" />
        </Form.Item>
      </Form>
    </div>
  );
}

export default Zc;
